<template>
  <div class="">
    <el-card>
      <el-table
        :data="allPermission"
        style="width: 100%; margin-bottom: 20px"
        row-key="id"
        border
        default-expand-all
        :tree-props="{ children: 'children', hasChildren: 'hasChildren' }"
      >
        <el-table-column prop="permissionName" label="权限名称" width="180" />
        <el-table-column prop="permissionMark" label="权限标识" width="180" />
        <el-table-column prop="permissionDesc" label="权限描述" />
      </el-table>
    </el-card>
  </div>
</template>

<script setup lang="ts">
import { ref } from 'vue'
import { permissionList } from '@/api/user'

// 所有权限
const allPermission = ref([])
const getPermissionList = async () =>
  (allPermission.value = await permissionList())
getPermissionList()
</script>

<style scoped></style>
